﻿//手机枚举
var Phone = { Android: "Android", iPhone: "iPhone" };
//手机类型
function PhoneKind() {
    this.Phone = "iPhone";
}
//获取手机类型
function GetPhoneKind() {
    var objPhoneKind = new PhoneKind();
    var objUserAgent = navigator.userAgent;
    if (objUserAgent.indexOf('Android') > -1 || objUserAgent.indexOf('Linux') > -1) {
        objPhoneKind.Phone = Phone.Android;
    }
    else if (objUserAgent.indexOf('iPhone') > -1) {
        objPhoneKind.Phone = Phone.iPhone;
    }
    return objPhoneKind;
}